(function( $ ){

   function AddrplaceholderInit() {
        
		 $( '#addr1,#addr2' ).removeAttr("placeholder");
        function addInputEvent() {
            $( '#addr1,#addr2' )
                .on( 'focus', function(){
                    var ctrlid = $('#epAddModaltable #ctrlid').val();
					var devtype = $('#epAddModaltable #devtype').val();
					var etype = $('#epAddModaltable #etype').val();
					var conf = $('#epAddModaltable #conf').val();
					var modelcode = $('#epAddModaltable #modelcode').val();
					var protocol = $('#epAddModaltable #protocol').val();
					
                    var me = $( this );
                    if (ctrlid == 3 && devtype == 1) {
						$("#addr1").attr("placeholder","输入ip");
						$("#addr2").attr("placeholder","输入port");
                        return;
                    }
					else if(conf == '01'){
						if(etype == '03'){
							$("#addr1").attr("placeholder","输入房间号");
							$("#addr2").attr("placeholder","输入窗帘号");
                        	return;
						}
						else if(etype == '04'){
							if(modelcode == '01'){
								$("#addr1").attr("placeholder","输入外机地址");
								$("#addr2").attr("placeholder","输入内机地址");
                        		return;
							}
							else if(modelcode == '02'){
								$("#addr1").attr("placeholder","输入温控器地址");
								
                        		return;
							}
						}
						else if(etype == '05'){
							$("#addr1").attr("placeholder","输入背景音乐的地址");
							
                        	return;
						}
					}
                   
                });
				
                
        };

        function delInputEvent() {
            $( '#addr1,#addr2' ).off( 'focus' );
           
        };
       
        addInputEvent();
    }
	
	
	
    $.AddrplaceholderInit = AddrplaceholderInit;
	

})(jQuery);